{% extends 'base.html' %}
{% load comment_tags %}
{% load resume_tags %}

{% block style %}
    body {
    background-color: #f7f7f7;
    }

    .card-block {
    width: 360px;
    margin-top: 1rem;
    padding: 1.25rem;
    background-color: white;
    font-size: larger;
    }

    .user-body {
    margin-top: 3px;
    display: inline-block;
    margin-left: 16px;
    }

    .font-weight-bold {
    font-weight: 700;
    }
    .a{

    }
{% endblock %}

{% block container %}
    <div class="row">
        <div class="col-lg-4">
            <div class="user card-block">

                <div class="user-info">
                    <img class="img-rounded"
                         src="{{ user.avatar.url }}"
                         alt="">
                    <div class="user-body">
                        <div class="user-name">
                            <span class="font-weight-bold">{{ user.nickname }} {{ user.identify }}</span>
                        </div>
                        <div class="text-muted">东软人才湾 第 {{ user.id }} 号成员</div>
                        <div class="text-muted">加入于 {{ user.date_joined }}</div>
                        <div class="text-muted">座右铭： {{ user.signature }}</div>
                    </div>
                </div>
                <hr>

                <div class="row">
                    <div class="col-lg-6">
                        <div class="text-center h1 text-primary">{{ user.resume_posts.count }}</div>
                        <div class="text-center text-muted">简历</div>
                    </div>
                    <div class="col-lg-6">
                        <div class="text-center h1 text-primary">{{ user.user_comments.count }}</div>
                        <div class="text-center text-muted">回复</div>
                    </div>

                </div>
            </div>
            <div class="card-block">
                <h4 class="card-title font-weight-bold">个人成就</h4>
                <div class="mt-2">推荐人才共获得 <span class="text-primary font-weight-bold">{% get_like_number request.user %}</span> 次点赞
                </div>
            </div>
        </div>
        <div class="col-lg-8">
            <div class="card-block" style="width: 700px">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="###" data-target="#tab2Content1" data-toggle="tab">简历</a></li>
                    <li><a href="###" data-target="#tab2Content2" data-toggle="tab">回复</a></li>
                </ul>
                <div class="tab-content">
                    <div class="tab-pane fade active in" id="tab2Content1">
                        <div class="items">
                            {% for foo in user.resume_posts.all %}
                                <div class="item">
                                    <div class="item-heading">
                                        <div class="pull-right label label-success">{{ foo.category }}</div>
                                        <h4>
                                            <a href="{{ foo.get_absolute_url }}">{{ foo.title }}</a>
                                            <a href="{% url 'recommendation:edit_resume' foo.id %}">
                                                <span class="label label-info label-badge">编辑</span>
                                            </a>

                                        </h4>
                                    </div>
                                    <div class="item-content">{{ foo.get_summary }}</div>
                                    <div class="item-footer">
                                        <a href="{{ foo.get_absolute_url }}" class="text-muted">
                                            <i class="icon-comments"></i> {{ foo.entry_comments.count }}</a> &nbsp;·
                                        <span class="text-muted">{{ foo.created|timeago }}</span>&nbsp;·
                                        <span class="text-muted">{{ foo.view_count }}次点击</span>&nbsp;
                                    </div>
                                </div>
                            {% endfor %}
                        </div>
{#                        <footer>#}
{#                            <ul class="pager pager-justify">#}
{#                                <li class="previous"><a href="#"><i class="icon-arrow-left"></i> 上一页</a></li>#}
{#                                <li class="next disabled"><a href="#">没有下一页 <i class="icon-arrow-right"></i></a></li>#}
{#                            </ul>#}
{#                        </footer>#}
                    </div>
                    <div class="tab-pane fade" id="tab2Content2">
                        <div class="items">
                            {% for foo in user.user_reply.all %}
                                <div class="item">
                                    <div class="item-heading">
                                        <h4>
                                            <a href="{% url 'recommendation:resume' foo.comment.entry.id %}">{{ foo.comment.entry }}</a>
                                        </h4>
                                    </div>
                                    <div class="item-content">{{ foo.content }}</div>
                                    <div class="item-footer">
                                        <a href="{% url 'recommendation:resume' foo.comment.entry.id %}"
                                           class="text-muted">
                                        </a>
                                        <span class="text-muted">{{ foo.submit_date|timeago }} </span>
                                    </div>
                                </div>
                            {% endfor %}
                        </div>
                    </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}




